<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    hahahhhhhhhhhhhhhhh 
</body>

<script>
    // 测试深拷贝和前拷贝
    //对象
    let object1 = {name:'天草',sex:'0'};
    let object2 = JSON.parse(JSON.stringify(object1));
    object2.name = '艾德';
    // console.log(object1);

    // 数组
    let array1 = [0,1,2,3];
    let array2 = array1.concat();
    array2[3] = '浅拷贝';
</script>
</html>